/**
  ******************************************************************************
  * @file           : vision_task.h
  * @author         : Tessia
  * @brief          : None
  * @attention      : None
  * @date           : 2024/2/28
  ******************************************************************************
  */



#ifndef SENTRY_LEFT_GIMBAL_VISION_TASK_H
#define SENTRY_LEFT_GIMBAL_VISION_TASK_H

#include "cmsis_os.h"
#include "driver_vision.h"
#include "pose_task.h"
#include "rotation_matrix_drv.h"
#include "auto_decision_make_task.h"

//单位mm
const float CAMERA_TO_ROTATION_CENTER_X = 140;
const float CAMERA_TO_ROTATION_CENTER_Y = 0;
const float CAMERA_TO_ROTATION_CENTER_Z = 58;
const float DISTANCE_TWO_GIMBAL = 348.6;

const uint16_t TEMPORARY_PAUSE_TIME = 50;

struct pose_cal{
    float gimbal_yaw;
    float gimbal_pitch;
    float chassis_yaw;
};

struct enemy_coo{
    float x;                     //单位m
    float y;
    float alpha_to_sentry;       //目标到哨兵的角度，单位deg
};

float deg2rad(float deg);

#ifdef __cplusplus
extern "C" {
#endif
//C
void vision_task(void* argument);
#ifdef __cplusplus
}
#endif
//C++

#endif //SENTRY_LEFT_GIMBAL_VISION_TASK_H
